﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SSN.Objects;
using SSN.Security.Token;

namespace SSN.WebFramework
{
    public class AnonymousSecurityContext : SSNSecurityContext
    {
        public string _uid = "Anonymous";

        #region SSNSecurityContext Members

        public bool IsAuthenticated
        {
            get { return true; }
        }

        public bool IsInRole(string rolename)
        {
            return false;
        }

        public bool IsValid
        {
            get { return true; }
        }

        public SSNSecurityToken Token
        {
            get { return TokenFactory.createToken(this); }
        }

        public List<string> allRoles
        {
            get { return new List<string>(); }
        }

        public string userid
        {
            get { return _uid; }
        }

        #endregion
    }
}
